﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using BLL.CustomAttribute;

namespace BLL.Model.User
{
    public class RoleInfo
    {
        [Key, StringProperty]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [Display(Name = "角色名称"), StringProperty]
        [Required(AllowEmptyStrings = false), StringLength(20)]
        public string Name { get; set; }

        [Display(Name = "角色详情"), StringProperty]
        [Required(AllowEmptyStrings = false), StringLength(20)]
        public string DisplayName { get; set; }

        [Display(Name = "包含用户列表")]
        public virtual IList<UserInfo> RoleUsers { get; set; }

    }
}